//请求组织架构接口
import request from "@/utils/request"


//请求查询企业的部门列表

export function getDepartmentsList() {
    return request({
        method: "get",
        url: "/company/department"
    })
}

//删除子部门
export function delDepartment(id) {
    return request({
        method: "DELETE",
        url: `/company/department/${id}`
    })
}
//添加子部门信息
export function addDepartment(data) {
    return request({
        method: "POST",
        url: `/company/department`,
        data
    })
}
//获取子部门信息
export function getDepartment(id) {
    return request({
        method: "get",
        url: `/company/department/${id}`
    })
}
//编辑子部门信息
export function editDepartment(data) {
    return request({
        method: "PUT",
        url: `/company/department/${data.id}`,
        data
    })
}